/** 
 * StringManipulator.h
 * 
 * Author: Carlos Lopes
 * Copyright(c), 2007
 */
#ifndef STRINGMANIPULATOR_H_
#define STRINGMANIPULATOR_H_

#include <string>
#include <vector>

namespace LADSUtil{

class StringManipulator {
	
	public:
	    
        /**
         * Convert a string to upper case
         *
         * @param str The string to be converted in upper cases
         * @return The string converted 
         */
        static std::string toUpper(const std::string& str);

        /**
         * Convert a string to lower case
         *
         * @param str The string to be converted in lower cases
         * @return The string converted 
         */
        static std::string toLower(const std::string& str);

        /**
         * Clean the string
         */
	    static std::string clean(const std::string& str);

        /**
         * Split the string according to the passed delimiter
         *
         * @param str The string to be split
         * @param delimiter The delimiter used to split the string. Blank space
         *                  is default.
         * @return A vector containing the itens splited.
         */
        static std::vector<std::string> split(std::string& str, const std::string& delimiter = " ");

        /**
         * Trim the given string
         */
        static void trim(std::string& str);

        /**
         * Check if a string is a number or not. 
         *
         * @param str The string to be checked
         * @return True if it is a number and false if not
         */
        static bool isNumber(const std::string& str);

}; // class	
}  // namespace

#endif /*STRINGBUFFER_H_*/
